package cn.com.dcsgo.controller;

import cn.com.dcsgo.pojo.Employee;
import cn.com.dcsgo.service.EmployeeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * EmployeeController
 *
 * @author Dcsgo
 * @since 2025/3/8 6:38
 */
@Controller
@RequestMapping("employee")
public class EmployeeController {
    private final EmployeeService employeeService;

    public EmployeeController(EmployeeService employeeService) {
        this.employeeService = employeeService;
    }

    @GetMapping
    @ResponseBody
    public List<Employee> queryAll() {
        return employeeService.queryAll();
    }
}
